package com.woniu.guoguo.dao;

import com.woniu.guoguo.model.Invite;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Richie
 * @since 2020-11-08
 */
public interface InviteMapper extends BaseMapper<Invite> {
    //新增邀请表
    @Insert("insert into invite (invite_userid,invited_userid,invited_name) values(#{inviteUserid},#{invitedUserid},#{invitedName})")
    void addinvition(Invite invite);
    //查询邀请表
    @Select("select invite_id,invite_userid,invited_userid,number,income,invited_name from invite where invite_userid = #{inviteUserid}")
    List<Invite> queryinvite(int inviteUserid);
}
